/**
 * @author renbangjie renbangjie@126.com
 * @date 2014-12-26 上午11:06:59
 * @version V1.0
 * <b>Copyright (c)</b> 2014医信金融信息服务（上海）有限公司-版权所有<br/>
 */
package com.yjd.comm.user.dto;

import com.yjd.comm.enums.GenderEnum;
import com.yjd.comm.user.model.UserModel;
import com.yjd.comm.util.CardNoUtils;
import org.springframework.beans.BeanUtils;

/**
 * @author renbangjie renbangjie@126.com
 * @date 2014-12-26 上午11:06:59
 */
public class UserSession extends UserModel {

	/**
	 * @Fields serialVersionUID : TODO
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 证件名称,当card_type为1的时候，该值为会员真实姓名
	 */
	private String idname;
	/**
	 * 类型，1：身份证
	 */
	private Integer card_type;
	/**
	 * 证件号码
	 */
	private String idcard;
	/**
	 * 生日
	 */
	private Long birthday;

	/**
	 * 生日
	 */
	private String birthdayFormmater;

	/*
     *性别(0：女，1：男)
     */
	private java.lang.Integer gender;

	private Long lastMobileLoginTime; //终端最后登录日期

	private Long device_id; //设备表主键

	private String device_no; //设备编号

	private String device_name; //设备名称

	private Integer is_inuse; //设备使用状态

	public UserSession() {
	}

	public String getIdname() {
		return idname;
	}

	public void setIdname(String idname) {
		this.idname = idname;
	}

	public Integer getCard_type() {
		return card_type;
	}

	public void setCard_type(Integer card_type) {
		this.card_type = card_type;
	}

	public String getIdcard() {
		return idcard;
	}

	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}

	public Long getBirthday() {
		return birthday;
	}

	public void setBirthday(Long birthday) {
		this.birthday = birthday;
	}

	public Integer getGender() {
		return this.gender;
	}

	public void setGender(Integer gender) {
		this.gender = gender;
	}

	public String getBirthdayFormmater() {
		if(idcard != null){
			return CardNoUtils.getBirthday(idcard);
		}
		return birthdayFormmater;
	}

	public void setBirthdayFormmater(String birthdayFormmater) {
		this.birthdayFormmater = birthdayFormmater;
	}

	public Long getLastMobileLoginTime() {
		return lastMobileLoginTime;
	}

	public void setLastMobileLoginTime(Long lastMobileLoginTime) {
		this.lastMobileLoginTime = lastMobileLoginTime;
	}

	public Long getDevice_id() {
		return device_id;
	}

	public void setDevice_id(Long device_id) {
		this.device_id = device_id;
	}

	public String getDevice_no() {
		return device_no;
	}

	public void setDevice_no(String device_no) {
		this.device_no = device_no;
	}

	public String getDevice_name() {
		return device_name;
	}

	public void setDevice_name(String device_name) {
		this.device_name = device_name;
	}

	public Integer getIs_inuse() {
		return is_inuse;
	}

	public void setIs_inuse(Integer is_inuse) {
		this.is_inuse = is_inuse;
	}

}
